#include<cstdio>
#include<iostream>
using namespace std;
#define int long long 
#define fread(x) ios::sync_with_stdio(x)
int tobinsum(int i){
	int sum = 0;
	while(i > 0){
		sum += i % 2;
		i /= 2;
	}
	return sum;
}
int tooctsum(int i){
	int sum = 0;
	while(i > 0){
		sum += i % 8;
		i /= 8;
	}
	return sum;
}
signed main(){
	fread(0);
	int cnt = 1,i = 1;
	
	while(cnt <= 23){
		if(tobinsum(i) == tooctsum(i)){
			cout <<cnt <<":"<< i <<endl;
			cnt ++;
		}		
		i ++;
	}
	return 0;
}
